#version 460
#extension GL_GOOGLE_include_directive : enable
#include "../../../core/shader_binding_ID.h"

layout(location = 0) in vec4       gColor;
layout(location = 1) in flat float gUvCoord;
layout(location = 2) in flat mat2  gRot;

layout(location=0) out vec4 outColor;


layout(binding = DEF_BINDING_WIDGET_Texture) uniform sampler2DArray tex;

void main(void){
	
	//outColor = textureLod(tex, vec3(gl_PointCoord, gUvCoord), 0);
	outColor = textureLod(tex, vec3(gRot * gl_PointCoord, gUvCoord), 0);
	outColor.rgb = mix(outColor.rgb, gColor.rgb, gColor.a);
	//outColor = vec4(1);
}


 